From 49683652f8b7f3680b3bc76cfee39be0b8efd524 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 12 Mar 2022 22:54:28 +0100 Subject: [PATCH] Further locate-file fixes on nativecomp * lisp/files.el (locate-file): Fix up previous locate-file change -- don't unconditionally return .elc on nativecomp. --- lisp/files.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 327375ddaa4..7be93662b1c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -996,7 +996,8 @@ one or more of those symbols." ;; return here (if it exists). (let* ((el (gethash (file-name-nondirectory file) comp-eln-to-el-h)) (elc (replace-regexp-in-string "\\.el\\'" ".elc" el))) - (if (file-exists-p elc) + (if (and (member ".elc" suffixes) + (file-exists-p elc)) elc el)) file))) -- 2.30.2